//
//  ZNewSwitchCell.m
//  WeClubs
//
//  Created by Zed Link on 21/4/2017.
//  Copyright © 2017 Zed. All rights reserved.
//

#import "ZNewSwitchCell.h"

@interface ZNewSwitchCell ()

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UISwitch *intentSwitch;

@end

@implementation ZNewSwitchCell

- (void)zSetupCell
{
    [super zSetupCell];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.separatorInset = UIEdgeInsetsMake(0, 12, 0, 0);
    
    [self.contentView setBackgroundColor:NAVBAR_BG_COLOR];
}

- (IBAction)intentSwitchAction:(UISwitch *)sender
{
    if (self.didSwitchBlock) {
        self.didSwitchBlock(sender.isOn);
    }
}

- (void)setTitle:(NSString *)title
{
    self.titleLabel.text = title;
}

@end
